﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjetS5
{
    public class Ability
    {
        public Ability(int Ability, Database database)
            : this(database.Datas.OfType<DB_Ability>().Single(e => e.Identifier == Ability)) { }
        public Ability(DB_Ability Ability)
        {
            ability = Ability;
            castTimeLeft = new TimeSpan(0);
            castTimeLeft = castTimeLeft.Add(ability.CastTime);
            cooldownLeft = new TimeSpan(0);
        }
        

        public DB_Ability ability;
        public TimeSpan castTimeLeft;
        public TimeSpan cooldownLeft;
    }
}
